package HLLibClasses;

import HLCode.HLClassManager;
import HLCode.HLLibClass;
import HLCode.HLObject;
import HLLib.base.HLByteList;
import HLLib.base.HLGraphics;
import HLLib.base.HLList;
import HLLib.game.HLCD;
import HLLib.game.HLSprite;
import HLLib.game.HLSpriteSeed;

public class HLClassSprite extends HLLibClass {
    public HLClassSprite(HLClassManager owner) {
        super(owner);
    }

    public HLObject NewObject() {
        return new HLSprite();
    }

    public void Execute(HLObject self, int index, HLObject args, HLObject resultOwnerObject, int resultIndex) {
        switch (index) {
        case 0: {
            ((HLSprite) self).RenderScale2D((HLGraphics)args.GetObject(0), args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5));
            break;
        }
        case 1: {
            ((HLSprite) self).RenderScale3D((HLGraphics)args.GetObject(0), args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5));
            break;
        }
        case 2: {
            ((HLSprite) self).Render2D((HLGraphics)args.GetObject(0), args.GetInt(0), args.GetInt(1));
            break;
        }
        case 3: {
            ((HLSprite) self).Render3D((HLGraphics)args.GetObject(0), args.GetInt(0), args.GetInt(1));
            break;
        }
        case 4: {
            ((HLSprite) self).RenderAdjustable((HLGraphics)args.GetObject(0), args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4));
            break;
        }
        case 5: {
            ((HLSprite) self).RenderAdjustableByArea((HLGraphics)args.GetObject(0), args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4));
            break;
        }
        case 6: {
            ((HLSprite) self).RenderAdjustableByCD((HLGraphics)args.GetObject(0), args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5));
            break;
        }
        case 7: {
            ((HLSprite) self).SetCurAnimateFrame(args.GetInt(0), args.GetInt(1));
            break;
        }
        case 8: {
            ((HLSprite) self).SetCurAnimate(args.GetInt(0));
            break;
        }
        case 9: {
            ((HLSprite) self).SetCurFrame(args.GetInt(0));
            break;
        }
        case 10: {
            if (resultOwnerObject == null) {
                ((HLSprite) self).PreviousCurFrame();
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLSprite) self).PreviousCurFrame());
            }
            break;
        }
        case 11: {
            if (resultOwnerObject == null) {
                ((HLSprite) self).PreviousCurFrameEx(args.GetInt(0));
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLSprite) self).PreviousCurFrameEx(args.GetInt(0)));
            }
            break;
        }
        case 12: {
            ((HLSprite) self).PreviousCurFrameCyc();
            break;
        }
        case 13: {
            ((HLSprite) self).PreviousCurFrameCycEx(args.GetInt(0), args.GetInt(1));
            break;
        }
        case 14: {
            if (resultOwnerObject == null) {
                ((HLSprite) self).NextCurFrame();
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLSprite) self).NextCurFrame());
            }
            break;
        }
        case 15: {
            if (resultOwnerObject == null) {
                ((HLSprite) self).NextCurFrameEx(args.GetInt(0));
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLSprite) self).NextCurFrameEx(args.GetInt(0)));
            }
            break;
        }
        case 16: {
            ((HLSprite) self).NextCurFrameCycEx(args.GetInt(0), args.GetInt(1));
            break;
        }
        case 17: {
            ((HLSprite) self).NextCurFrameCyc();
            break;
        }
        case 18: {
            if (resultOwnerObject == null) {
                ((HLSprite) self).IsCurFrameEnd();
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLSprite) self).IsCurFrameEnd());
            }
            break;
        }
        case 19: {
            ((HLSprite) self).SetAnimateFrameOfNext(args.GetInt(0), args.GetInt(1));
            break;
        }
        case 20: {
            ((HLSprite) self).SetAnimateOfNext(args.GetInt(0));
            break;
        }
        case 21: {
            ((HLSprite) self).SetFrameOfNext(args.GetInt(0));
            break;
        }
        case 22: {
            ((HLSprite) self).KeepCurAnimateFrameOfNext();
            break;
        }
        case 23: {
            if (resultOwnerObject == null) {
                ((HLSprite) self).PreviousNextFrame();
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLSprite) self).PreviousNextFrame());
            }
            break;
        }
        case 24: {
            if (resultOwnerObject == null) {
                ((HLSprite) self).PreviousNextFrameEX(args.GetInt(0));
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLSprite) self).PreviousNextFrameEX(args.GetInt(0)));
            }
            break;
        }
        case 25: {
            ((HLSprite) self).PreviousNextFrameCyc();
            break;
        }
        case 26: {
            ((HLSprite) self).PreviousNextFrameCycEX(args.GetInt(0), args.GetInt(1));
            break;
        }
        case 27: {
            if (resultOwnerObject == null) {
                ((HLSprite) self).NextNextFrame();
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLSprite) self).NextNextFrame());
            }
            break;
        }
        case 28: {
            if (resultOwnerObject == null) {
                ((HLSprite) self).NextNextFrameEX(args.GetInt(0));
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLSprite) self).NextNextFrameEX(args.GetInt(0)));
            }
            break;
        }
        case 29: {
            ((HLSprite) self).NextNextFrameCyc();
            break;
        }
        case 30: {
            ((HLSprite) self).NextNextFrameCycEX(args.GetInt(0), args.GetInt(1));
            break;
        }
        case 31: {
            ((HLSprite) self).RefreshByNext();
            break;
        }
        case 32: {
            ((HLSprite) self).Refresh(args.GetInt(0), args.GetInt(1));
            break;
        }
        case 33: {
            ((HLSprite) self).RefreshEx(args.GetInt(0), args.GetInt(1), args.GetInt(2));
            break;
        }
        case 34: {
            ((HLSprite) self).RefreshExWithoutCheckIsLoadOver(args.GetInt(0), args.GetInt(1), args.GetInt(2));
            break;
        }
        case 35: {
            ((HLSprite) self).Move(args.GetInt(0), args.GetInt(1));
            break;
        }
        case 36: {
            ((HLSprite) self).Move3D(args.GetInt(0), args.GetInt(1), args.GetInt(2));
            break;
        }
        case 37: {
            ((HLSprite) self).MoveFP(args.GetInt(0), args.GetInt(1));
            break;
        }
        case 38: {
            ((HLSprite) self).MoveFP3D(args.GetInt(0), args.GetInt(1), args.GetInt(2));
            break;
        }
        case 39: {
            ((HLSprite) self).MoveBySpeed2D();
            break;
        }
        case 40: {
            ((HLSprite) self).MoveBySpeed3D();
            break;
        }
        case 41: {
            ((HLSprite) self).SetX(args.GetInt(0));
            break;
        }
        case 42: {
            ((HLSprite) self).SetXFP(args.GetInt(0));
            break;
        }
        case 43: {
            ((HLSprite) self).SetY(args.GetInt(0));
            break;
        }
        case 44: {
            ((HLSprite) self).SetYFP(args.GetInt(0));
            break;
        }
        case 45: {
            ((HLSprite) self).SetZ(args.GetInt(0));
            break;
        }
        case 46: {
            ((HLSprite) self).SetZFP(args.GetInt(0));
            break;
        }
        case 47: {
            ((HLSprite) self).SetPos(args.GetInt(0), args.GetInt(1));
            break;
        }
        case 48: {
            ((HLSprite) self).SetPos3D(args.GetInt(0), args.GetInt(1), args.GetInt(2));
            break;
        }
        case 49: {
            ((HLSprite) self).SetPosFP(args.GetInt(0), args.GetInt(1));
            break;
        }
        case 50: {
            ((HLSprite) self).SetPosFP3D(args.GetInt(0), args.GetInt(1), args.GetInt(2));
            break;
        }
        case 51: {
            ((HLSprite) self).SetPosAdjustable(args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4));
            break;
        }
        case 52: {
            ((HLSprite) self).SetPosAdjustableByCD(args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5));
            break;
        }
        case 53: {
            ((HLSprite) self).SetPosByCD((HLSprite)args.GetObject(0), args.GetInt(0));
            break;
        }
        case 54: {
            ((HLSprite) self).SetPosCDByCD((HLSprite)args.GetObject(0), args.GetInt(0), args.GetInt(1));
            break;
        }
        case 55: {
            ((HLSprite) self).SetTrans(args.GetInt(0));
            break;
        }
        case 56: {
            ((HLSprite) self).DoTrans(args.GetInt(0));
            break;
        }
        case 57: {
            if (resultOwnerObject == null) {
                ((HLSprite) self).TouchRect(args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4));
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLSprite) self).TouchRect(args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4)));
            }
            break;
        }
        case 58: {
            if (resultOwnerObject == null) {
                ((HLSprite) self).TouchSprite2D(args.GetInt(0), (HLSprite)args.GetObject(0), args.GetInt(1), args.GetBoolean(0));
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLSprite) self).TouchSprite2D(args.GetInt(0), (HLSprite)args.GetObject(0), args.GetInt(1), args.GetBoolean(0)));
            }
            break;
        }
        case 59: {
            if (resultOwnerObject == null) {
                ((HLSprite) self).TouchSprite3D(args.GetInt(0), (HLSprite)args.GetObject(0), args.GetInt(1), args.GetBoolean(0));
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLSprite) self).TouchSprite3D(args.GetInt(0), (HLSprite)args.GetObject(0), args.GetInt(1), args.GetBoolean(0)));
            }
            break;
        }
        case 60: {
            if (resultOwnerObject == null) {
                ((HLSprite) self).TouchCD(args.GetInt(0), (HLCD)args.GetObject(0), args.GetInt(1), args.GetInt(2), args.GetBoolean(0));
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLSprite) self).TouchCD(args.GetInt(0), (HLCD)args.GetObject(0), args.GetInt(1), args.GetInt(2), args.GetBoolean(0)));
            }
            break;
        }
        case 61: {
            if (resultOwnerObject == null) {
                ((HLSprite) self).IsPointInCD(args.GetInt(0), args.GetInt(1), args.GetInt(2));
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLSprite) self).IsPointInCD(args.GetInt(0), args.GetInt(1), args.GetInt(2)));
            }
            break;
        }
        case 62: {
            if (resultOwnerObject == null) {
                ((HLSprite) self).PointInCD(args.GetInt(0), args.GetInt(1));
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLSprite) self).PointInCD(args.GetInt(0), args.GetInt(1)));
            }
            break;
        }
        case 63: {
            if (resultOwnerObject == null) {
                ((HLSprite) self).TryMoveSpriteInclined2DTouchSpriteGroups(args.GetInt(0), (HLList)args.GetObject(0), (HLByteList)args.GetObject(1), args.GetInt(1), args.GetInt(2), args.GetInt(3));
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLSprite) self).TryMoveSpriteInclined2DTouchSpriteGroups(args.GetInt(0), (HLList)args.GetObject(0), (HLByteList)args.GetObject(1), args.GetInt(1), args.GetInt(2), args.GetInt(3)));
            }
            break;
        }
        case 64: {
            if (resultOwnerObject == null) {
                ((HLSprite) self).TryMoveSpriteInclined3DTouchSpriteGroups(args.GetInt(0), (HLList)args.GetObject(0), (HLByteList)args.GetObject(1), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4));
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLSprite) self).TryMoveSpriteInclined3DTouchSpriteGroups(args.GetInt(0), (HLList)args.GetObject(0), (HLByteList)args.GetObject(1), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4)));
            }
            break;
        }
        case 65: {
            if (resultOwnerObject == null) {
                ((HLSprite) self).TryMoveSpriteInclined2DTouchSpriteGroupsBySpeed(args.GetInt(0), (HLList)args.GetObject(0), (HLByteList)args.GetObject(1), args.GetInt(1));
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLSprite) self).TryMoveSpriteInclined2DTouchSpriteGroupsBySpeed(args.GetInt(0), (HLList)args.GetObject(0), (HLByteList)args.GetObject(1), args.GetInt(1)));
            }
            break;
        }
        case 66: {
            if (resultOwnerObject == null) {
                ((HLSprite) self).TryMoveSpriteInclined3DTouchSpriteGroupsBySpeed(args.GetInt(0), (HLList)args.GetObject(0), (HLByteList)args.GetObject(1), args.GetInt(1));
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLSprite) self).TryMoveSpriteInclined3DTouchSpriteGroupsBySpeed(args.GetInt(0), (HLList)args.GetObject(0), (HLByteList)args.GetObject(1), args.GetInt(1)));
            }
            break;
        }
        }
    }

    public void StaticExecute(int index, HLObject args, HLObject resultOwnerObject, int resultIndex) {
        switch (index) {
        case 0: {
            if (resultOwnerObject == null) {
                HLSprite.Create((HLSpriteSeed)args.GetObject(0));
            } else {
                resultOwnerObject.SetObject(resultIndex, HLSprite.Create((HLSpriteSeed)args.GetObject(0)));
            }
            break;
        }
        }
    }
}
